﻿@using EasyAbp.Abp.SettingUi
@model EasyAbp.Abp.SettingUi.Web.Pages.Components.SettingHtmlInfo

@{
    string optionStr;
    if (Model.Properties.TryGetValue(SettingUiConst.Options, out var optionList))
    {
        optionStr = optionList.ToString();
    }
    else
    {
        optionStr = String.Empty;
    }
}

@if (!Model.Description.IsNullOrEmpty())
{
<p class="form-text">@Model.Description</p>
}
<select id="@Model.Name" name="@Model.FormName" class="form-control">
    @foreach (var option in optionStr.Split(SettingUiConst.OptionsSeparator))
    {
        string selected = option == Model.Value ? "selected" : "";
    <!option value="@option" @selected>@option</!option>
    }
</select>
